package com.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TCollege entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_college", schema = "")
public class TCollege implements java.io.Serializable {

	// Fields

	private String collegeId;
	private String id;
	private String collegeName;
	private String schoolName;
	private String isEnble;
	private Set<TMajor> TMajors = new HashSet<TMajor>(0);

	// Constructors

	/** default constructor */
	public TCollege() {
	}

	/** minimal constructor */
	public TCollege(String collegeId, String id) {
		this.collegeId = collegeId;
		this.id = id;
	}

	/** full constructor */
	public TCollege(String collegeId, String id, String collegeName, String schoolName, String isEnble, Set<TMajor> TMajors) {
		this.collegeId = collegeId;
		this.id = id;
		this.collegeName = collegeName;
		this.schoolName = schoolName;
		this.isEnble = isEnble;
		this.TMajors = TMajors;
	}

	// Property accessors
	@Column(name = "collegeID", unique = true, nullable = false)
	public String getCollegeId() {
		return this.collegeId;
	}

	public void setCollegeId(String collegeId) {
		this.collegeId = collegeId;
	}
	@Id
	@Column(name = "id", nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "collegeName")
	public String getCollegeName() {
		return this.collegeName;
	}

	public void setCollegeName(String collegeName) {
		this.collegeName = collegeName;
	}

	@Column(name = "schoolName")
	public String getSchoolName() {
		return this.schoolName;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}

	@Column(name = "isEnble")
	public String getIsEnble() {
		return this.isEnble;
	}

	public void setIsEnble(String isEnble) {
		this.isEnble = isEnble;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TCollege")
	public Set<TMajor> getTMajors() {
		return this.TMajors;
	}

	public void setTMajors(Set<TMajor> TMajors) {
		this.TMajors = TMajors;
	}

}